<template>
  <div>
    <component :is="(selectNode.type||'').toLowerCase()" :config="selectNode.props"/>
  </div>
</template>

<script>
import Approval from './ApprovalNodeConfig.vue' // 审核人
import Condition from './ConditionNodeConfig.vue' // 条件模块
import Concurrent from './ConcurrentNodeConfig.vue' // 并线模块 CONCURRENT
import Cc from './CcNodeConfig.vue' // 抄送人
import FormAuthorityConfig from './FormAuthorityConfig.vue'
import Root from './RootNodeConfig.vue' // 第一层

export default {
  name: "NodeConfig",
  components: {
    Approval,
    Condition,
    Root,
    Cc,
    FormAuthorityConfig,
    Concurrent
  },
  data() {
    return {
      active: 'properties',
    }
  },
  computed: {
    selectNode() {
      console.log('主体的信息数据：', this.$store.state.selectedNode)
      return this.$store.state.selectedNode
    },
    name() {
      switch (this.selectNode.type) {
        case 'ROOT':
          return '设置发起人';
        case 'APPROVAL':
          return '设置审批人';
        case 'CC':
          return '设置抄送人';
        default:
          return null;
      }
    }
  },
  methods: {}
}
</script>

<style lang="less" scoped>

</style>
